package com.atguigu.guliguli.product.service;

import com.atguigu.guliguli.common.utils.PageUtils;
import com.atguigu.guliguli.product.entity.AttrEntity;
import com.atguigu.guliguli.product.vo.AttrGroupRelationVo;
import com.atguigu.guliguli.product.vo.AttrRespVo;
import com.atguigu.guliguli.product.vo.AttrVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author: 叶子
 * @date: 2021/11/28 18:47
 **/
public interface AttrService extends IService<AttrEntity> {
    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catalogId, String attrType);

    PageUtils queryPage(Map<String, Object> params);

    AttrRespVo getAttrInfo(Long attrId);

    void saveAttr(AttrVo attr);

    void updateAttr(AttrVo attr);

    /**
     * 根据分组id查找关联的所有的基本属性
     * @param attrGroupId
     * @return
     */
    List<AttrEntity> getRelationAttr(Long attrGroupId);

    void deleteRelation(AttrGroupRelationVo[] vos);

    /**
     * 获取当前分组没有关联的所有属性
     * @param params
     * @param attrGroupId
     * @return
     */
    PageUtils getNoRelationAttr(Map<String, Object> params, Long attrGroupId);
}